<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 菜单表
 * Class Menu
 *
 * @since 2.0
 *
 * @Entity(table="menu")
 */
class Menu extends Model
{
    /**
     * 
     * @Id()
     * @Column()
     *
     * @var int
     */
    private $id;

    /**
     * 父级菜单ID
     *
     * @Column(name="parent_id", prop="parentId")
     *
     * @var int
     */
    private $parentId;

    /**
     * 排序
     *
     * @Column()
     *
     * @var int
     */
    private $order;

    /**
     * 菜单名
     *
     * @Column()
     *
     * @var string
     */
    private $name;

    /**
     * 图标
     *
     * @Column()
     *
     * @var string|null
     */
    private $icon;

    /**
     * 路由
     *
     * @Column()
     *
     * @var string|null
     */
    private $uri;

    /**
     * 创建时间
     *
     * @Column(name="created_at", prop="createdAt")
     *
     * @var int
     */
    private $createdAt;

    /**
     * 修改时间
     *
     * @Column(name="updated_at", prop="updatedAt")
     *
     * @var int
     */
    private $updatedAt;

    /**
     * 1显示 0隐藏
     *
     * @Column(name="is_show", prop="isShow")
     *
     * @var int
     */
    private $isShow;

    /**
     * 1 top 2 left
     *
     * @Column()
     *
     * @var int
     */
    private $location;

    /**
     * 开放状态 1:对方开放 2:不对外开放
     *
     * @Column(name="is_open_outside", prop="isOpenOutside")
     *
     * @var int|null
     */
    private $isOpenOutside;


    /**
     * @param int $id
     *
     * @return void
     */
    public function setId(int $id): void
    {
        $this->id = $id;
    }

    /**
     * @param int $parentId
     *
     * @return void
     */
    public function setParentId(int $parentId): void
    {
        $this->parentId = $parentId;
    }

    /**
     * @param int $order
     *
     * @return void
     */
    public function setOrder(int $order): void
    {
        $this->order = $order;
    }

    /**
     * @param string $name
     *
     * @return void
     */
    public function setName(string $name): void
    {
        $this->name = $name;
    }

    /**
     * @param string|null $icon
     *
     * @return void
     */
    public function setIcon(?string $icon): void
    {
        $this->icon = $icon;
    }

    /**
     * @param string|null $uri
     *
     * @return void
     */
    public function setUri(?string $uri): void
    {
        $this->uri = $uri;
    }

    /**
     * @param int $createdAt
     *
     * @return void
     */
    public function setCreatedAt(int $createdAt): void
    {
        $this->createdAt = $createdAt;
    }

    /**
     * @param int $updatedAt
     *
     * @return void
     */
    public function setUpdatedAt(int $updatedAt): void
    {
        $this->updatedAt = $updatedAt;
    }

    /**
     * @param int $isShow
     *
     * @return void
     */
    public function setIsShow(int $isShow): void
    {
        $this->isShow = $isShow;
    }

    /**
     * @param int $location
     *
     * @return void
     */
    public function setLocation(int $location): void
    {
        $this->location = $location;
    }

    /**
     * @param int|null $isOpenOutside
     *
     * @return void
     */
    public function setIsOpenOutside(?int $isOpenOutside): void
    {
        $this->isOpenOutside = $isOpenOutside;
    }

    /**
     * @return int
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * @return int
     */
    public function getParentId(): ?int
    {
        return $this->parentId;
    }

    /**
     * @return int
     */
    public function getOrder(): ?int
    {
        return $this->order;
    }

    /**
     * @return string
     */
    public function getName(): ?string
    {
        return $this->name;
    }

    /**
     * @return string|null
     */
    public function getIcon(): ?string
    {
        return $this->icon;
    }

    /**
     * @return string|null
     */
    public function getUri(): ?string
    {
        return $this->uri;
    }

    /**
     * @return int
     */
    public function getCreatedAt(): ?int
    {
        return $this->createdAt;
    }

    /**
     * @return int
     */
    public function getUpdatedAt(): ?int
    {
        return $this->updatedAt;
    }

    /**
     * @return int
     */
    public function getIsShow(): ?int
    {
        return $this->isShow;
    }

    /**
     * @return int
     */
    public function getLocation(): ?int
    {
        return $this->location;
    }

    /**
     * @return int|null
     */
    public function getIsOpenOutside(): ?int
    {
        return $this->isOpenOutside;
    }

}
